﻿#pragma once
#include "HalconTool.h"

// CDiaTrainTG 对话框

class CDiaTrainTG : public CDialogEx
{
	DECLARE_DYNAMIC(CDiaTrainTG)

public:
	CDiaTrainTG(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~CDiaTrainTG();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DIALOG_TG };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedBtnPath();
	afx_msg void OnBnClickedButton11();
	afx_msg void OnBnClickedButtonBackAbnTrain();

	BOOL m_bIsReadImage;
	BOOL m_bIsExtractRegionCup;
	BOOL m_bIsTrainFibished;
	BOOL m_IsDrawMirror;
	BOOL m_bIsAutoThresh;
	void UpdateUI();

	HObject ho_RegionTemplate;
	virtual BOOL OnInitDialog();
	afx_msg void OnClose();
	CWnd* m_pWnd;
	int m_nbinaryThresh;
	CString m_strpath;

	HObject hv_image, ho_RegionModelShape, RegionProductRect, RegionProductErosion, ho_MeanImage,  ho_VarImage, ho_RegionInterference;
	HTuple Row0, Row1, Col0, Col1;
	HTuple m_hvWindow, hv_ShapeModelID, hv_VarModelID;
	afx_msg void OnBnClickedBtnSave();
	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
	afx_msg void OnBnClickedButtonMeanimage();
	afx_msg void OnBnClickedButtonVarimage();
	int nIndexShowImageBack;
	int m_nProductIsCircle;
	afx_msg void OnBnClickedButtonInterference();
};
